import request from '@/utils/request'

// 查询工作流主体列表
export function listWorkflowMain(data) {
  return request({
    url: '/system/workflowMain/list',
    method: 'post',
    data: data
  })
}

// 通过ID组查询工作流主体列表
export function listWorkflowMainByIds(flowId, pageParams) {
  return request({
    url: '/system/workflowMain/listByIds/' + flowId,
    method: 'get',
    params: pageParams
  })
}

// 查询工作流主体详细
export function getWorkflowMain(flowId) {
  return request({
    url: '/system/workflowMain/' + flowId,
    method: 'get'
  })
}

// 新增工作流主体
export function addWorkflowMain(data) {
  return request({
    url: '/system/workflowMain',
    method: 'post',
    data: data
  })
}

// 批量新增工作流主体
export function addWorkflowMains(data) {
  return request({
    url: '/system/workflowMain/addWorkflowMains',
    method: 'post',
    data: data
  })
}

// 修改工作流主体
export function updateWorkflowMain(data) {
  return request({
    url: '/system/workflowMain',
    method: 'put',
    data: data
  })
}

// 批量修改工作流主体
export function updateWorkflowMains(data) {
  return request({
    url: '/system/workflowMain/editSinWorkflowMains',
    method: 'put',
    data: data
  })
}

// 删除工作流主体
export function delWorkflowMain(flowId) {
  return request({
    url: '/system/workflowMain/' + flowId,
    method: 'delete'
  })
}

// 导出工作流主体
export function exportWorkflowMain(query) {
  return request({
    url: '/system/workflowMain/export',
    method: 'get',
    params: query
  })
}

// 导出工作流主体（包含样式）
export function exportWorkflowMainWithStyle(data) {
  return request({
    url: '/system/workflowMain/exportWithStyle',
    method: 'post',
    data: data
  })
}
